<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>StaticBucketMap (Apache Commons Collections 4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="StaticBucketMap (Apache Commons Collections 4.0 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StaticBucketMap.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/map/SingletonMap.html" title="class in org.apache.commons.collections4.map"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/map/TransformedMap.html" title="class in org.apache.commons.collections4.map"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/map/StaticBucketMap.html" target="_top">Frames</a></li>
<li><a href="StaticBucketMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.collections4.map</div>
<h2 title="Class StaticBucketMap" class="title">Class StaticBucketMap&lt;K,V&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/collections4/map/AbstractIterableMap.html" title="class in org.apache.commons.collections4.map">org.apache.commons.collections4.map.AbstractIterableMap</a>&lt;K,V&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.commons.collections4.map.StaticBucketMap&lt;K,V&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/Get.html" title="interface in org.apache.commons.collections4">Get</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/IterableGet.html" title="interface in org.apache.commons.collections4">IterableGet</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/IterableMap.html" title="interface in org.apache.commons.collections4">IterableMap</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/Put.html" title="interface in org.apache.commons.collections4">Put</a>&lt;K,V&gt;</dd>
</dl>
<hr>
<br>
<pre>public final class <span class="strong">StaticBucketMap&lt;K,V&gt;</span>
extends <a href="../../../../../org/apache/commons/collections4/map/AbstractIterableMap.html" title="class in org.apache.commons.collections4.map">AbstractIterableMap</a>&lt;K,V&gt;</pre>
<div class="block">A StaticBucketMap is an efficient, thread-safe implementation of
 <code>java.util.Map</code> that performs well in in a highly
 thread-contentious environment.  The map supports very efficient
 <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#get(java.lang.Object)"><code>get</code></a>, <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#put(K, V)"><code>put</code></a>,
 <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#remove(java.lang.Object)"><code>remove</code></a> and <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#containsKey(java.lang.Object)"><code>containsKey</code></a>
 operations, assuming (approximate) uniform hashing and
 that the number of entries does not exceed the number of buckets.  If the
 number of entries exceeds the number of buckets or if the hash codes of the
 objects are not uniformly distributed, these operations have a worst case
 scenario that is proportional to the number of elements in the map
 (<i>O(n)</i>).<p>

 Each bucket in the hash table has its own monitor, so two threads can
 safely operate on the map at the same time, often without incurring any
 monitor contention.  This means that you don't have to wrap instances
 of this class with <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collections.html?is-external=true#synchronizedMap(java.util.Map)" title="class or interface in java.util"><code>Collections.synchronizedMap(Map)</code></a>;
 instances are already thread-safe.  Unfortunately, however, this means
 that this map implementation behaves in ways you may find disconcerting.
 Bulk operations, such as <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#putAll(java.util.Map)"><code>putAll</code></a> or the
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util"><code>retainAll</code></a> operation in collection
 views, are <i>not</i> atomic.  If two threads are simultaneously
 executing

 <pre>
   staticBucketMapInstance.putAll(map);
 </pre>

 and

 <pre>
   staticBucketMapInstance.entrySet().removeAll(map.entrySet());
 </pre>

 then the results are generally random.  Those two statement could cancel
 each other out, leaving <code>staticBucketMapInstance</code> essentially
 unchanged, or they could leave some random subset of <code>map</code> in
 <code>staticBucketMapInstance</code>.<p>

 Also, much like an encyclopedia, the results of <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#size()"><code>size()</code></a> and
 <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#isEmpty()"><code>isEmpty()</code></a> are out-of-date as soon as they are produced.<p>

 The iterators returned by the collection views of this class are <i>not</i>
 fail-fast.  They will <i>never</i> raise a
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/ConcurrentModificationException.html?is-external=true" title="class or interface in java.util"><code>ConcurrentModificationException</code></a>.  Keys and values
 added to the map after the iterator is created do not necessarily appear
 during iteration.  Similarly, the iterator does not necessarily fail to
 return keys and values that were removed after the iterator was created.<p>

 Finally, unlike <a href="http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><code>HashMap</code></a>-style implementations, this
 class <i>never</i> rehashes the map.  The number of buckets is fixed
 at construction time and never altered.  Performance may degrade if
 you do not allocate enough buckets upfront.<p>

 The <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#atomic(java.lang.Runnable)"><code>atomic(Runnable)</code></a> method is provided to allow atomic iterations
 and bulk operations; however, overuse of <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#atomic(java.lang.Runnable)"><code>atomic</code></a>
 will basically result in a map that's slower than an ordinary synchronized
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><code>HashMap</code></a>.

 Use this class if you do not require reliable bulk operations and
 iterations, or if you can make your own guarantees about how bulk
 operations will affect the map.<p></div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>3.0 (previously in main package v2.1)</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: StaticBucketMap.java 1477799 2013-04-30 19:56:11Z tn $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested_classes_inherited_from_class_java.util.Map">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;java.util.<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">K</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">V</a>&gt;</code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#StaticBucketMap()">StaticBucketMap</a></strong>()</code>
<div class="block">Initializes the map with the default number of buckets (255).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#StaticBucketMap(int)">StaticBucketMap</a></strong>(int&nbsp;numBuckets)</code>
<div class="block">Initializes the map with a specified number of buckets.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#atomic(java.lang.Runnable)">atomic</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>&nbsp;r)</code>
<div class="block">Prevents any operations from occurring on this map while the
  given <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> executes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#clear()">clear</a></strong>()</code>
<div class="block">Clears the map of all entries.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#containsKey(java.lang.Object)">containsKey</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</code>
<div class="block">Checks if the map contains the specified key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#containsValue(java.lang.Object)">containsValue</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</code>
<div class="block">Checks if the map contains the specified value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#entrySet()">entrySet</a></strong>()</code>
<div class="block">Gets the entry set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;obj)</code>
<div class="block">Compares this map to another, as per the Map specification.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#get(java.lang.Object)">get</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</code>
<div class="block">Gets the value associated with the key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Gets the hash code, as per the Map specification.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#isEmpty()">isEmpty</a></strong>()</code>
<div class="block">Checks if the size is currently zero.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#keySet()">keySet</a></strong>()</code>
<div class="block">Gets the key set.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#put(K, V)">put</a></strong>(<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>&nbsp;key,
   <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&nbsp;value)</code>
<div class="block">Puts a new key value mapping into the map.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#putAll(java.util.Map)">putAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;? extends <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>,? extends <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;&nbsp;map)</code>
<div class="block">Puts all the entries from the specified map into this map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#remove(java.lang.Object)">remove</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</code>
<div class="block">Removes the specified key from the map.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#size()">size</a></strong>()</code>
<div class="block">Gets the current size of the map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html#values()">values</a></strong>()</code>
<div class="block">Gets the values.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.collections4.map.AbstractIterableMap">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.collections4.map.<a href="../../../../../org/apache/commons/collections4/map/AbstractIterableMap.html" title="class in org.apache.commons.collections4.map">AbstractIterableMap</a></h3>
<code><a href="../../../../../org/apache/commons/collections4/map/AbstractIterableMap.html#mapIterator()">mapIterator</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="StaticBucketMap()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>StaticBucketMap</h4>
<pre>public&nbsp;StaticBucketMap()</pre>
<div class="block">Initializes the map with the default number of buckets (255).</div>
</li>
</ul>
<a name="StaticBucketMap(int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>StaticBucketMap</h4>
<pre>public&nbsp;StaticBucketMap(int&nbsp;numBuckets)</pre>
<div class="block">Initializes the map with a specified number of buckets.  The number
 of buckets is never below 17, and is always an odd number (StaticBucketMap
 ensures this). The number of buckets is inversely proportional to the
 chances for thread contention.  The fewer buckets, the more chances for
 thread contention.  The more buckets the fewer chances for thread
 contention.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numBuckets</code> - the number of buckets for this map</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="size()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;int&nbsp;size()</pre>
<div class="block">Gets the current size of the map.
 The value is computed fresh each time the method is called.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the current size</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#size()" title="class or interface in java.util"><code>Map.size()</code></a></dd></dl>
</li>
</ul>
<a name="isEmpty()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre>public&nbsp;boolean&nbsp;isEmpty()</pre>
<div class="block">Checks if the size is currently zero.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if empty</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#isEmpty()" title="class or interface in java.util"><code>Map.isEmpty()</code></a></dd></dl>
</li>
</ul>
<a name="get(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&nbsp;get(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</pre>
<div class="block">Gets the value associated with the key.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to retrieve</dd>
<dt><span class="strong">Returns:</span></dt><dd>the associated value</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#get(java.lang.Object)" title="class or interface in java.util"><code>Map.get(Object)</code></a></dd></dl>
</li>
</ul>
<a name="containsKey(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsKey</h4>
<pre>public&nbsp;boolean&nbsp;containsKey(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</pre>
<div class="block">Checks if the map contains the specified key.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to check</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if found</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsKey(java.lang.Object)" title="class or interface in java.util"><code>Map.containsKey(Object)</code></a></dd></dl>
</li>
</ul>
<a name="containsValue(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsValue</h4>
<pre>public&nbsp;boolean&nbsp;containsValue(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</pre>
<div class="block">Checks if the map contains the specified value.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the value to check</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if found</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsValue(java.lang.Object)" title="class or interface in java.util"><code>Map.containsValue(Object)</code></a></dd></dl>
</li>
</ul>
<a name="put(java.lang.Object,java.lang.Object)">
<!--   -->
</a><a name="put(K, V)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&nbsp;put(<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>&nbsp;key,
    <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&nbsp;value)</pre>
<div class="block">Puts a new key value mapping into the map.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to use</dd><dd><code>value</code> - the value to use</dd>
<dt><span class="strong">Returns:</span></dt><dd>the previous mapping for the key</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#put(K, V)" title="class or interface in java.util"><code>Map.put(Object, Object)</code></a></dd></dl>
</li>
</ul>
<a name="remove(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&nbsp;remove(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</pre>
<div class="block">Removes the specified key from the map.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to remove</dd>
<dt><span class="strong">Returns:</span></dt><dd>the previous value at this key</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util"><code>Map.remove(Object)</code></a></dd></dl>
</li>
</ul>
<a name="keySet()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keySet</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>&gt;&nbsp;keySet()</pre>
<div class="block">Gets the key set.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the key set</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#keySet()" title="class or interface in java.util"><code>Map.keySet()</code></a></dd></dl>
</li>
</ul>
<a name="values()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;&nbsp;values()</pre>
<div class="block">Gets the values.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the values</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#values()" title="class or interface in java.util"><code>Map.values()</code></a></dd></dl>
</li>
</ul>
<a name="entrySet()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>entrySet</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;&gt;&nbsp;entrySet()</pre>
<div class="block">Gets the entry set.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the entry set</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#entrySet()" title="class or interface in java.util"><code>Map.entrySet()</code></a></dd></dl>
</li>
</ul>
<a name="putAll(java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putAll</h4>
<pre>public&nbsp;void&nbsp;putAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;? extends <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>,? extends <a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;&nbsp;map)</pre>
<div class="block">Puts all the entries from the specified map into this map.
 This operation is <b>not atomic</b> and may have undesired effects.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>map</code> - the map of entries to add</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#putAll(java.util.Map)" title="class or interface in java.util"><code>Map.putAll(Map)</code></a></dd></dl>
</li>
</ul>
<a name="clear()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;void&nbsp;clear()</pre>
<div class="block">Clears the map of all entries.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#clear()" title="class or interface in java.util"><code>Map.clear()</code></a></dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;obj)</pre>
<div class="block">Compares this map to another, as per the Map specification.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - the object to compare to</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if equal</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Gets the hash code, as per the Map specification.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/StaticBucketMap.html" title="type parameter in StaticBucketMap">V</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the hash code</dd></dl>
</li>
</ul>
<a name="atomic(java.lang.Runnable)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>atomic</h4>
<pre>public&nbsp;void&nbsp;atomic(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>&nbsp;r)</pre>
<div class="block">Prevents any operations from occurring on this map while the
  given <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> executes.  This method can be used, for
  instance, to execute a bulk operation atomically:

  <pre>
    staticBucketMapInstance.atomic(new Runnable() {
        public void run() {
            staticBucketMapInstance.putAll(map);
        }
    });
  </pre>

  It can also be used if you need a reliable iterator:

  <pre>
    staticBucketMapInstance.atomic(new Runnable() {
        public void run() {
            Iterator iterator = staticBucketMapInstance.iterator();
            while (iterator.hasNext()) {
                foo(iterator.next();
            }
        }
    });
  </pre>

  <b>Implementation note:</b> This method requires a lot of time
  and a ton of stack space.  Essentially a recursive algorithm is used
  to enter each bucket's monitor.  If you have twenty thousand buckets
  in your map, then the recursive method will be invoked twenty thousand
  times.  You have been warned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>r</code> - the code to execute atomically</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StaticBucketMap.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/map/SingletonMap.html" title="class in org.apache.commons.collections4.map"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/map/TransformedMap.html" title="class in org.apache.commons.collections4.map"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/map/StaticBucketMap.html" target="_top">Frames</a></li>
<li><a href="StaticBucketMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
